
/*******************************************************
*  Team name: FTPMP
*  Class involve: Map
*  Version: 1.0 
*  Author: Ada Ko
*  History of modification: 
*  
*  Ver 1.0, Fred,
*  -add Map constructor
*  
*  Ver 1.1, Fred,
*  -add EventBox, SABox
*  -add validateEventBox, validateSABox, validateMTBox
*  
*  Ver 1.2, Fred,
*  -add getSABoxList, getMTBoxList
*  
*******************************************************/


package entity;
import java.awt.*;
import javax.swing.*;



public class Map
{
	int[] event;
	int[] SA;
	int[]MT;

	public Map()
	{
		this.event=new int[7];
		this.SA=new int[7];
		this.MT=new int[6];
	
		this.event[0]=2;
		this.event[1]=9;
		this.event[2]=14;
		this.event[3]=26;
		this.event[4]=10;
		this.event[5]=21;
		this.event[6]=27;
		
		this.SA[0]=5;
		this.SA[1]=8;
		this.SA[2]=25;
		this.SA[3]=24;
		this.SA[4]=11;
		this.SA[5]=7;
		this.SA[6]=20;
		
		this.MT[0]=6;
		this.MT[1]=13;
		this.MT[2]=23;
		this.MT[3]=19;
		this.MT[4]=16;
		this.MT[5]=3;
	}
	
	public boolean validateEventBox(int BoxNo)
	{
		for(int i=0;i<this.event.length;i++)
		{
			if(this.event[i]==BoxNo)
				return true;
		}
		return false;
	}
	
	public boolean validateSABox(int BoxNo)
	{
		for(int i=0;i<this.SA.length;i++)
		{
			if(this.SA[i]==BoxNo)
				return true;
		}
		return false;
	}
	
	public boolean validateMTBox(int BoxNo)
	{
		for(int i=0;i<this.MT.length;i++)
		{
			if(this.MT[i]==BoxNo)
				return true;
		}
		return false;
	}

	public int[] getEventBoxList() {
	
		return this.event;
	}

	public int[] getSABoxList() 
	{
		
		return this.SA;
	}
	
	public int[] getMTBoxList() 
	{
	
		return this.MT;
	}
	
}